<?php
$db = db::getInstance();
$get_id=$_POST['id'];
$get_id_form=$_POST['form'];

// selection de lid des donnees a afficeher  
$id_reference = new UserDataModel();
$filter = array(new DFC(UserDataModel::FIELD_USER_ID, $get_id, DFC::EXACT),
        (new DFC(UserDataModel::FIELD_FORM_ID, $get_id_form, DFC::EXACT)));
$id_reference = UserDataModel::findByFilter($db, $filter);


foreach ($id_reference as $x)

{
    $id=$x->getIdRef();
}

//extraction

$id_reference_values=new UserDataRefModel();
$filter = array(new DFC(UserDataRefModel::FIELD_ID_REF, $id, DFC::EXACT));
$data=  UserDataRefModel::findByFilter($db, $filter);

echo '<table class="table" width="100%" cellspacing="0">
                    <thead>
                        <tr>
                            <th scope="col">
                                Nom de champ   
                            </th>  
                          <th scope="col">
                                Valeur
                            </th>  
                           </thead>';

        foreach ($data as $x)
{

            echo "
                <tr><td>".$x->getKey()."</td><td>".$x->getValue()."</td></tr>";
}

?>